Framework (A-Z)

Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.

Name

byte

Examples
// declare variable "a" of type byte
byte a;  
// assign "a" the value 23
a = 23;
// declare variable "b" and assign it the value 128
byte b = 128;   
// declare variable "c" and assign it the sum of "a" and "b"
byte c = a + b;
Description Data type for bytes, 8 bits of information storing numerical values from 0 to 255. Bytes are a convenient datatype for sending information to and from the serial port and for representing letters in a simpler format than the char datatype. byte is equivalent to unsigned char.
Syntax
byte var
byte var = value
Parameters
var variable name referencing the value
value a number between 0 and 255
Usage Application
Related char
unsigned char
int
unsigned int
long
unsigned long
float
double
Updated on July 07, 2011 11:07:56pm PDT

Creative Commons License